package com.goodfox.web.generic.provide.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.goodfox.web.generic.provide.entity.Grade;
import com.goodfox.web.generic.provide.mapper.GradeMapper;
import com.goodfox.web.generic.provide.service.GradeService;

/**
 * 层级Service实现类
 * @author qin gt
 *
 */
@Transactional
@Service(value="gradeService")
public class GradeServiceImpl implements GradeService {
	
	/** 层级Mapper */
	@Autowired
	private GradeMapper gradeMapper;

	/**
	 * 根据Id获取子层级（列表）
	 * @param gradeId
	 * @return
	 */
	public List<Grade> querySubGradeListById(String gradeId){
		return gradeMapper.querySubGradeListById(gradeId);
	}
	
	/**
	 * 根据Id获取本层级（列表）
	 * @param gradeId
	 * @return
	 */
	public Grade getGradeListById(String gradeId) {
		return gradeMapper.getGradeListById(gradeId);
	}
}
